const express = require('express');
const router = express.Router();
const articleHandler = require('../router_handler/article')
const expressJoi = require('@escook/express-joi')
const { add_cate_schema } = require('../schema/article')
    // 获取文章分类的列表数据
router.get('/cates', articleHandler.getArticle)
    // 新增文章分类的路由
router.post('/addcates', articleHandler.addArticleCates)
    // 删除文章分类的路由
router.get('/deletecate/:id', articleHandler.deleteCateById)
    // /根据id获取文章
router.get('/cates/:id', articleHandler.getArtCateById)
    // 更新文章分类的路由
router.post('/updatecate', articleHandler.updateCateById)

module.exports = router